﻿
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Sharp.Domain.PlatformBoundedContext.OrgModule.Aggregates;

namespace Sharp.Domain.PlatformBoundedContext.ModelConfigurations
{
    public partial class OrgLevelConfiguration
        : EntityTypeConfiguration<OrgLevel>
    {
        public OrgLevelConfiguration()
        {
            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
        
         
 
            Property(t => t.Title)
                .HasMaxLength(50)
                .IsRequired();
 
            Property(t => t.Remark)
                .HasMaxLength(200)
                .IsOptional();

            Property(t => t.CreatedTime)
                .IsOptional();
            Property(t => t.CreatedUserId)
                .IsOptional();
            Property(t => t.ModifiTime)
                .IsOptional();
            Property(t => t.ModifiedUserId)
                .IsOptional(); 
        }
    }
}

